package devcamp.teama.yahooooooo.api;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.*;

@SuppressWarnings("serial")
public class YahoooooooAPIServlet extends HttpServlet {
    
    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        viewApiPage(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        viewApiPage(req, resp);
    }
    
    void viewApiPage(HttpServletRequest req, HttpServletResponse resp){
        resp.setContentType("text/plain");
        try {
            resp.getWriter().println("This Page is YahoooooooAPI.");
        } catch (IOException e) {
            e.printStackTrace();
            //FIXME:ログの出力をする
        }
    }
    
}
